3.242 \(\int \frac{\sqrt{-c+d x} \sqrt{c+d x} \left (a+b x^2\right )}{x^3} \, dx\)

Optimal. Leaf size=96 \[ -\frac{\left (2 b c^2-a d^2\right ) \tan ^{-1}\left (\frac{\sqrt{d x-c} \sqrt{c+d x}}{c}\right )}{2 c}-\frac{a \sqrt{d x-c} \sqrt{c+d x}}{2 x^2}+b \sqrt{d x-c} \sqrt{c+d x} \]

[Out]

b*Sqrt[-c + d*x]*Sqrt[c + d*x] - (a*Sqrt[-c + d*x]*Sqrt[c + d*x])/(2*x^2) - ((2*
b*c^2 - a*d^2)*ArcTan[(Sqrt[-c + d*x]*Sqrt[c + d*x])/c])/(2*c)

_______________________________________________________________________________________

Rubi [A]  time = 0.319887, antiderivative size = 114, normalized size of antiderivative = 1.19, number of steps used = 5, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161 \[ \frac{1}{2} \sqrt{d x-c} \sqrt{c+d x} \left (2 b-\frac{a d^2}{c^2}\right )-\frac{\left (2 b c^2-a d^2\right ) \tan ^{-1}\left (\frac{\sqrt{d x-c} \sqrt{c+d x}}{c}\right )}{2 c}+\frac{a (d x-c)^{3/2} (c+d x)^{3/2}}{2 c^2 x^2} \]

Antiderivative was successfully verified.

[In]  Int[(Sqrt[-c + d*x]*Sqrt[c + d*x]*(a + b*x^2))/x^3,x]

[Out]

((2*b - (a*d^2)/c^2)*Sqrt[-c + d*x]*Sqrt[c + d*x])/2 + (a*(-c + d*x)^(3/2)*(c +
d*x)^(3/2))/(2*c^2*x^2) - ((2*b*c^2 - a*d^2)*ArcTan[(Sqrt[-c + d*x]*Sqrt[c + d*x
])/c])/(2*c)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 18.789, size = 95, normalized size = 0.99 \[ \frac{a \left (- c + d x\right )^{\frac{3}{2}} \left (c + d x\right )^{\frac{3}{2}}}{2 c^{2} x^{2}} + \frac{\left (a d^{2} - 2 b c^{2}\right ) \operatorname{atan}{\left (\frac{\sqrt{- c + d x} \sqrt{c + d x}}{c} \right )}}{2 c} - \frac{\sqrt{- c + d x} \sqrt{c + d x} \left (a d^{2} - 2 b c^{2}\right )}{2 c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((b*x**2+a)*(d*x-c)**(1/2)*(d*x+c)**(1/2)/x**3,x)

[Out]

a*(-c + d*x)**(3/2)*(c + d*x)**(3/2)/(2*c**2*x**2) + (a*d**2 - 2*b*c**2)*atan(sq
rt(-c + d*x)*sqrt(c + d*x)/c)/(2*c) - sqrt(-c + d*x)*sqrt(c + d*x)*(a*d**2 - 2*b
*c**2)/(2*c**2)

_______________________________________________________________________________________

Mathematica [C]  time = 0.19657, size = 105, normalized size = 1.09 \[ \frac{1}{2} \left (\frac{\left (2 b x^2-a\right ) \sqrt{d x-c} \sqrt{c+d x}}{x^2}+\left (2 i b c-\frac{i a d^2}{c}\right ) \log \left (\frac{-4 \sqrt{d x-c} \sqrt{c+d x}+4 i c}{2 b c^2 x-a d^2 x}\right )\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[(Sqrt[-c + d*x]*Sqrt[c + d*x]*(a + b*x^2))/x^3,x]

[Out]

((Sqrt[-c + d*x]*Sqrt[c + d*x]*(-a + 2*b*x^2))/x^2 + ((2*I)*b*c - (I*a*d^2)/c)*L
og[((4*I)*c - 4*Sqrt[-c + d*x]*Sqrt[c + d*x])/(2*b*c^2*x - a*d^2*x)])/2

_______________________________________________________________________________________

Maple [B]  time = 0.02, size = 182, normalized size = 1.9 \[ -{\frac{1}{2\,{x}^{2}}\sqrt{dx-c}\sqrt{dx+c} \left ( \ln \left ( -2\,{\frac{{c}^{2}-\sqrt{-{c}^{2}}\sqrt{{d}^{2}{x}^{2}-{c}^{2}}}{x}} \right ){x}^{2}a{d}^{2}-2\,\ln \left ( -2\,{\frac{{c}^{2}-\sqrt{-{c}^{2}}\sqrt{{d}^{2}{x}^{2}-{c}^{2}}}{x}} \right ){x}^{2}b{c}^{2}-2\,{x}^{2}b\sqrt{-{c}^{2}}\sqrt{{d}^{2}{x}^{2}-{c}^{2}}+a\sqrt{{d}^{2}{x}^{2}-{c}^{2}}\sqrt{-{c}^{2}} \right ){\frac{1}{\sqrt{-{c}^{2}}}}{\frac{1}{\sqrt{{d}^{2}{x}^{2}-{c}^{2}}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((b*x^2+a)*(d*x-c)^(1/2)*(d*x+c)^(1/2)/x^3,x)

[Out]

-1/2*(d*x-c)^(1/2)*(d*x+c)^(1/2)*(ln(-2*(c^2-(-c^2)^(1/2)*(d^2*x^2-c^2)^(1/2))/x
)*x^2*a*d^2-2*ln(-2*(c^2-(-c^2)^(1/2)*(d^2*x^2-c^2)^(1/2))/x)*x^2*b*c^2-2*x^2*b*
(-c^2)^(1/2)*(d^2*x^2-c^2)^(1/2)+a*(d^2*x^2-c^2)^(1/2)*(-c^2)^(1/2))/(d^2*x^2-c^
2)^(1/2)/x^2/(-c^2)^(1/2)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^2 + a)*sqrt(d*x + c)*sqrt(d*x - c)/x^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.25108, size = 419, normalized size = 4.36 \[ -\frac{8 \, b c d^{4} x^{6} - a c^{5} - 2 \,{\left (5 \, b c^{3} d^{2} + 2 \, a c d^{4}\right )} x^{4} +{\left (2 \, b c^{5} + 5 \, a c^{3} d^{2}\right )} x^{2} -{\left (8 \, b c d^{3} x^{5} + 3 \, a c^{3} d x - 2 \,{\left (3 \, b c^{3} d + 2 \, a c d^{3}\right )} x^{3}\right )} \sqrt{d x + c} \sqrt{d x - c} + 2 \,{\left (4 \,{\left (2 \, b c^{2} d^{3} - a d^{5}\right )} x^{5} - 3 \,{\left (2 \, b c^{4} d - a c^{2} d^{3}\right )} x^{3} -{\left (4 \,{\left (2 \, b c^{2} d^{2} - a d^{4}\right )} x^{4} -{\left (2 \, b c^{4} - a c^{2} d^{2}\right )} x^{2}\right )} \sqrt{d x + c} \sqrt{d x - c}\right )} \arctan \left (-\frac{d x - \sqrt{d x + c} \sqrt{d x - c}}{c}\right )}{2 \,{\left (4 \, c d^{3} x^{5} - 3 \, c^{3} d x^{3} -{\left (4 \, c d^{2} x^{4} - c^{3} x^{2}\right )} \sqrt{d x + c} \sqrt{d x - c}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^2 + a)*sqrt(d*x + c)*sqrt(d*x - c)/x^3,x, algorithm="fricas")

[Out]

-1/2*(8*b*c*d^4*x^6 - a*c^5 - 2*(5*b*c^3*d^2 + 2*a*c*d^4)*x^4 + (2*b*c^5 + 5*a*c
^3*d^2)*x^2 - (8*b*c*d^3*x^5 + 3*a*c^3*d*x - 2*(3*b*c^3*d + 2*a*c*d^3)*x^3)*sqrt
(d*x + c)*sqrt(d*x - c) + 2*(4*(2*b*c^2*d^3 - a*d^5)*x^5 - 3*(2*b*c^4*d - a*c^2*
d^3)*x^3 - (4*(2*b*c^2*d^2 - a*d^4)*x^4 - (2*b*c^4 - a*c^2*d^2)*x^2)*sqrt(d*x +
c)*sqrt(d*x - c))*arctan(-(d*x - sqrt(d*x + c)*sqrt(d*x - c))/c))/(4*c*d^3*x^5 -
 3*c^3*d*x^3 - (4*c*d^2*x^4 - c^3*x^2)*sqrt(d*x + c)*sqrt(d*x - c))

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{\left (a + b x^{2}\right ) \sqrt{- c + d x} \sqrt{c + d x}}{x^{3}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x**2+a)*(d*x-c)**(1/2)*(d*x+c)**(1/2)/x**3,x)

[Out]

Integral((a + b*x**2)*sqrt(-c + d*x)*sqrt(c + d*x)/x**3, x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.239757, size = 212, normalized size = 2.21 \[ \frac{\sqrt{d x + c} \sqrt{d x - c} b d + \frac{{\left (2 \, b c^{2} d - a d^{3}\right )} \arctan \left (\frac{{\left (\sqrt{d x + c} - \sqrt{d x - c}\right )}^{2}}{2 \, c}\right )}{c} + \frac{2 \,{\left (a d^{3}{\left (\sqrt{d x + c} - \sqrt{d x - c}\right )}^{6} - 4 \, a c^{2} d^{3}{\left (\sqrt{d x + c} - \sqrt{d x - c}\right )}^{2}\right )}}{{\left ({\left (\sqrt{d x + c} - \sqrt{d x - c}\right )}^{4} + 4 \, c^{2}\right )}^{2}}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^2 + a)*sqrt(d*x + c)*sqrt(d*x - c)/x^3,x, algorithm="giac")

[Out]

(sqrt(d*x + c)*sqrt(d*x - c)*b*d + (2*b*c^2*d - a*d^3)*arctan(1/2*(sqrt(d*x + c)
 - sqrt(d*x - c))^2/c)/c + 2*(a*d^3*(sqrt(d*x + c) - sqrt(d*x - c))^6 - 4*a*c^2*
d^3*(sqrt(d*x + c) - sqrt(d*x - c))^2)/((sqrt(d*x + c) - sqrt(d*x - c))^4 + 4*c^
2)^2)/d